/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.aacorps.javaeal.servlets;

import edu.aacorps.javaeal.remote.UserServiceRemote;
import java.io.IOException;
import java.io.PrintWriter;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author anti
 */
public class TestServlet extends HttpServlet {
    
    @EJB
    private UserServiceRemote userService;

    @Override
    protected void doGet(HttpServletRequest request, 
	HttpServletResponse response) throws ServletException,
	IOException {
	         response.setContentType("text/html;charset=UTF-8");
                 PrintWriter out = response.getWriter();
                 out.println("<html>");
                 out.println("<head>");
                 out.println("<title>Servlet TestServlet</title>");
                 out.println("</head>");
                 out.println("<body>");
                 try {
//                     userService.registerUser();
                 out.println("User registered!");
                 } catch (Exception e) {
                     out.println("User register failed!");
                 }
                 out.println("</body>");
                 out.println("</html>");
         	 }
	
}
